List Box Control Syntax

Description

Xdialog list box control syntax.

Name
Description
Check Box List Box Control Syntax

A control type that displays a list of choices in a list box.

List Box (Drop-down) Control Syntax

The value of Variable_Name is a base-1 index if the variable is declared as Numeric. If undeclared or left un-initialized, the variable is a string that returns the text of the choice that is selected.

List Box (Multi-Field Multi-Column) Control Syntax

The Tabbed List Box control displays a list box with multiple columns. The entries in the choice_array or choice_variable are separated into columns with the "|" (tab) character.

List Box (Single Field Multi-Column) Control Syntax

One or more Multi-Select List Box objects may appear inside the Format section of a UI_DLG_BOX() function. The selections are stored in the %mw% variable.

List Box (Single Field Single Column) Control Syntax

One or more List Box objects may appear inside the Format section of a UI_DLG_BOX() function. To clear or repopulate a list box, simply redefine its Choices variable.

List Box C Directive

The C directive defines the multiple column structure of a multi-column list box.  When you have multiple directives in a Format string, you separate them with semi-colons ";".

List Box Choices Dialog Box

Includes user defined choices as well as choices computed automatically.

List Box Control

A list box control is a variant of the combo box control, except that the list is typically displayed with several choices visible, so that the user does not have to click a button to display the choices. You can turn a combo box into a list box by changing the '^=' directive to '^#'. The syntax for a list box object is:

List Box Control Methods

The List Box Control has the following methods. The list box control methods are used with a pointer to the control in the following way: .METHOD(). Refer to Retrieving a Pointer to a Control for techniques for getting a pointer.

List Box D Directive

The D directive causes the line spacing in a list box to be adjusted automatically for the point size of the type being displayed.

List Box E Directive

The E directive defines a multiple selection list box using the standard Windows conventions for selecting multiple items.

List Box F Directive

The F directive references the name of a character variable containing an owner draw format string to be applied when the list box is loaded. It is used when creating resizable column list boxes.

List Box H Directive

The H directive allows horizontal scrolling in a list box.  When you have multiple directives in a Format string, you separate them with semi-colons ";".

List Box I Directive

The I directive defines an image to place in a list box.  When you have multiple directives in a Format string, you separate them with semi-colons ";".

List Box K Directive

Prior to Version 7 Build 3013 the return value from a list box that used owner draw formatting always included the formatting directives (assuming that the {Data=} directive had NOT been used). To preserve this behavior, you must now use the K directive.

List Box KE Directive

Refer to Record List - Edit Combo Box Control Syntax, List Box Control Syntax for more details.

List Box KL Directive

Refer to Record List - List Box Control Syntax, List Box Control Syntax for more details

List Box M Directive

The M directive defines a multiple selection list box. When you have multiple directives in a Format string, you separate them with semi-colons ";".

List Box ME Directive

When multiple items are selected, the ME directive causes a multi-select list box to place the value that has focus at the beginning of the list that it returns.

List Box MW Directive

The MW directive populates the List Box with the selections of a Multi-Select List Box. The Choices argument is not used in the List Box Control Syntax. When you have multiple directives in a Format string, you separate them with semi-colons ";".

List Box O Directive

The O directive allows you to format the entries in a List Box control. When you have multiple directives in a Format string, you separate them with semi-colons ";".

List Box O Directive {@} Operator

The {@} operator is the 'text select' operator. It selects text from the input value (i.e. from the list of entries that are to be displayed by the list box).

List Box O Directive {B} Operator

The {B} operator is used in a List Box owner draw (O) directive to specify background colors.

List Box O Directive {C} Operator

The {C} operator is used in a List Box owner draw (O) directive to specify foreground colors.

List Box O Directive {F} Operator

The {F} operator is used in a list box owner draw string to specify font, point size, and style.

List Box O Directive {I} Operator

The {I} operator is used to specify images within an owner draw (O) directive.

List Box O Directive {T} Operator

Used to specify tabs within an owner draw (O) directive.

List Box R Directive

The R directive specifies that a list box will have a specific number of lines, regardless of the point size of the text in the list box. Note the [%O={@@};F=fmt;R;B=T%.100,18item^#data] line in the example below.

List Box T Directive

The T directive defines bubble help for a list box.  The bubble help can access the A_DLG_FLYOVER variable which contains the text of the row that the cursor is currently over.

List Boxes with Resizable Columns

Alpha Anywhere allows you to create list boxes with resizable columns. These controls allow you to present more data more compactly and attractively. This capability depends on the {A} anchor buttons command.

Xdialog - List Control - W=milliseconds Directive to Delay Firing Selected Event

Can be added to a List control to delay firing the selected event for a specified number of milliseconds.

Multi-Select List Box Control

By including the %M% directive in the definition of a list box, you convert the list box from a single-select to a multi-select control. For example, the following script allows you to select multiple cities: